<extend name="Public/base" />

<block name="body">
	<!-- 标题栏 -->
	<div class="main-title">
		<h2>广告设置</h2>
	</div>
	<div class="cf">
		
    </div>
     <style>
		.data-table thead th{text-align: center; }
		.align td{text-align: center;}
	</style>
    <!-- 数据列表 -->
    <div class="data-table table-striped">
	<table class="">
	    <thead>
	        <tr>
				<th class="row-selected row-selected"><input class="check-all" type="checkbox"/></th>
				<th>ID</th>
				<th>标题</th>
				<th>图片</th>
				<th>链接地址</th>
				<th>更多信息</th>				
			</tr>
	    </thead>
	    <tbody>
			<notempty name="_list">
			<volist name="_list" id="vo">
			<tr class="align">
	            <td><input class="ids" type="checkbox" name="id[]" value="{$vo.uid}" /></td>
				<td>{$vo.id} </td>
				<td>{$vo.kname}</td>
				<td><img src="__ROOT__{$vo.path}" width="50"></td>
				<td>{$vo.a_lian}</td>
				<td>
					<a href="{:U('comp/anli',array('cid'=>$vo['cid']))}">公司案例</a> /
					<a href="{:U('comp/links',array('cid'=>$vo['cid']))}">友情链接</a> 
				</td>
			</tr>
			</volist>
			<else/>
			<td colspan="12" class="text-center"> aOh! 暂时还没有内容! </td>
			</notempty>
		</tbody>
    </table>
	</div>
    
</block>

<block name="script">
	<script src="__STATIC__/thinkbox/jquery.thinkbox.js"></script>

	<script type="text/javascript">
	//搜索功能
	$("#search").click(function(){
		var url = $(this).attr('url');
        var query  = $('.search-form').find('input').serialize();
        query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
        query = query.replace(/^&/g,'');
        if( url.indexOf('?')>0 ){
            url += '&' + query;
        }else{
            url += '?' + query;
        }
		window.location.href = url;
	});
	//回车搜索
	$(".search-input").keyup(function(e){
		if(e.keyCode === 13){
			$("#search").click();
			return false;
		}
	});
    //导航高亮
    highlight_subnav('{:U('comp/index')}');
	</script>
</block>
